package io.renren.modules.sys.service.impl;

import io.renren.modules.sys.dao.SysUserDao;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.SysYearDao;
import io.renren.modules.sys.entity.SysYearEntity;
import io.renren.modules.sys.service.SysYearService;

import javax.annotation.Resource;


@Service("sysYearService")
public class SysYearServiceImpl extends ServiceImpl<SysYearDao, SysYearEntity> implements SysYearService {
    @Resource
    SysYearDao sysYearDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SysYearEntity> page = this.page(
                new Query<SysYearEntity>().getPage(params),
                new QueryWrapper<SysYearEntity>()
        );
        return new PageUtils(page);
    }

    @Override
    public SysYearEntity selectstart() {
        return sysYearDao.selectOne(new QueryWrapper<SysYearEntity>().eq("state","1"));
    }

}
